% imdb=load('imdb_ori.mat');
% sets= imdb.sets;

imdb.sets.id=[1 2 3];
imdb.sets.name={'train'  'val'  'test'};

imdb.classes.name={'cell_image','mask'};

imdb.paths.image='./data/image/%s_train.tif';
imdb.paths.classSegmentation='./data/mask/%s_label.tif';

N=2117;Nv=117;
imdb.images.id=1:2117;

files=dir('image'); 
for i=3:N+2
    tmp=files(i).name;
    imdb.images.name(i-2)={tmp(1:end-10)};
end

imdb.images.segmentation=ones(1,N);

imdb.images.set=ones(1,N);
rall=randperm(N);rid=rall(1:Nv);
imdb.images.set(rid)=2;

save('imdb11.mat','imdb');